package roborally;

import be.kuleuven.cs.som.annotate.*;

/**
 * @author Jef Keijers/Bachelor of Science: Informatics
 * @version 1.0
 */
@Value
public enum Direction {
	UP,RIGHT,DOWN,LEFT;
	
	public int getCode() {
		return this.ordinal();
	}
	
	public static Direction getDirection(int c) {
		if (c == 0) return Direction.UP;
		if (c == 1) return Direction.RIGHT;
		if (c == 2) return Direction.DOWN;
		if (c == 3) return Direction.LEFT;
		return null;
	}
}
